from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from time import sleep
from postion import options
from postion import service

driver = webdriver.Chrome(options=options,service=service)
driver.get(r'https://www.baidu.com/')
sleep(3)
driver.maximize_window()
#百度网站：BIDUPSID 和 BDUSS
cookie1 = {'name':'BIDUPSID','value':'968A8853BF7C5F27C827ACFE499EA615'}
cookie2={'name':'BDUSS','value':'zRYV0hpQVdIMlVKQ015LXJHZ1pDMDB-OUIyYWllcGZoenZrQWZHbG93MGZuYnhsRVFBQUFBJCQAAAAAAAAAAAEAAAB228xS0a7MyMrJsM-80MDZydcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8QlWUfEJVlR'}

driver.add_cookie(cookie1)
driver.add_cookie(cookie2)
driver.refresh()
sleep(5)
driver.quit()